package com.ruoyi.cms.service.impl;

import java.util.List;

import com.ruoyi.cms.domain.CmsContent;
import com.ruoyi.cms.mapper.CmsContentMapper;
import com.ruoyi.cms.service.ICmsContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 政策资讯Service业务层处理
 * 
 * @author hct
 * @date 2022-01-22
 */
@Service
public class CmsContentServiceImpl implements ICmsContentService
{
    @Autowired
    private CmsContentMapper cmsContentMapper;

    /**
     * 查询政策资讯
     * 
     * @param id 政策资讯主键
     * @return 政策资讯
     */
    @Override
    public CmsContent selectCmsContentById(Long id)
    {
        return cmsContentMapper.selectCmsContentById(id);
    }

    /**
     * 查询政策资讯列表
     * 
     * @param cmsContent 政策资讯
     * @return 政策资讯
     */
    @Override
    public List<CmsContent> selectCmsContentList(CmsContent cmsContent)
    {
        return cmsContentMapper.selectCmsContentList(cmsContent);
    }

    /**
     * 新增政策资讯
     * 
     * @param cmsContent 政策资讯
     * @return 结果
     */
    @Override
    public int insertCmsContent(CmsContent cmsContent)
    {
        return cmsContentMapper.insertCmsContent(cmsContent);
    }

    /**
     * 修改政策资讯
     * 
     * @param cmsContent 政策资讯
     * @return 结果
     */
    @Override
    public int updateCmsContent(CmsContent cmsContent)
    {
        return cmsContentMapper.updateCmsContent(cmsContent);
    }

    /**
     * 批量删除政策资讯
     * 
     * @param ids 需要删除的政策资讯主键
     * @return 结果
     */
    @Override
    public int deleteCmsContentByIds(Long[] ids)
    {
        return cmsContentMapper.deleteCmsContentByIds(ids);
    }

    /**
     * 删除政策资讯信息
     * 
     * @param id 政策资讯主键
     * @return 结果
     */
    @Override
    public int deleteCmsContentById(Long id)
    {
        return cmsContentMapper.deleteCmsContentById(id);
    }
}
